﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 期末考试
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
        /*public Form3(sqlData data)
        {
            InitializeComponent();

            textBox1.Text = data.username;
            textBox2.Text = data.password;
            textBox3.Text = data.password;
        }*/
        private void button1_Click(object sender, EventArgs e)
        {
            //var userid = "admin";
            //var password = 123;
            //var anotherpassword = 123;

            var UID = textBox1.Text;
            var PWD = textBox2.Text;
            var APWD = textBox3.Text;

            if(UID != string.Empty || PWD != string.Empty || APWD != string.Empty)
            {
               MessageBox.Show("注册成功");
             }
            else
            {
                MessageBox.Show("注册失败");
            }
            sqlData data = new sqlData();
            data.username = textBox1.Text;
            data.password = textBox2.Text;
            data.password = textBox3.Text;

            //new sqlDA().update(data);
            new Update(data);
        }

        private void Update(sqlData data)
        {
            throw new NotImplementedException();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("取消失败");
            
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
